<template>
  <jeesdp-table :data="data" :fields="fields" :page="page"></jeesdp-table>
</template>
<script lang="js" setup>
import {onMounted, ref} from "vue";
import api from "../../api/department";

onMounted(() => {
  api.list().then(data => {
    console.log(data)
  });
})

const fields = ref([{
  prop: "name",
  label: "名称",
  width: "150",
}, {
  prop: "name",
  label: "名称",
  width: "150",
}]);

const data = ref([{
  name: "研发部",
}]);

const page = ref({
  total: 400,
  pageNum: 1,
  pageSize: 20,
  currentChange(current) {
    console.log(current);
  },
  sizeChange(size) {
    console.log(size);
  },
})

</script>
<style>
.el-table {
  height: calc(100% - 45px);
}
</style>
